﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using Newtonsoft.Json;
using SqlSugar;

namespace Aioms.Models
{
    [SugarTable("role")]
    public class Role
    {
        public Role()
        {
            this.Created = DateTime.Now;
            this.Updated = DateTime.Now;

        }

        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "id")]
        [JsonProperty("id")]
        public long Id { get; set; }

        [SugarColumn(ColumnName = "eid")]
        [JsonProperty("eid")]
        public long Eid { get; set; }

        [SugarColumn(ColumnName = "name")]
        [JsonProperty("name")]
        public string Name { get; set; }

        [SugarColumn(ColumnName = "description")]
        [JsonProperty("description")]
        public string Description { get; set; }

        [SugarColumn(ColumnName = "flag")]
        [JsonProperty("flag")]
        public string Flag { get; set; }

        [SugarColumn(ColumnName = "checkedids")]
        [JsonProperty("checkedids")]
        public string CheckedIds { get; set; }

        [SugarColumn(ColumnName = "created")]
        [JsonProperty("created")]
        public DateTime? Created { get; set; }

        [SugarColumn(ColumnName = "updated")]
        [JsonProperty("updated")]
        public DateTime? Updated { get; set; }
    }
}
